import axios from '@/libs/api.request.js'

export const getList = data => {
    return axios.request({
        method:'post',
        data:data,
        url:'dictionary/getList'
    });
};

export const save = data =>{
    return axios.request({
        method:'post',
        data:data,
        url:'dictionary/save'
    });
};

export const update = data => {
    return axios.request({
        method:'post',
        data:data,
        url:'dictionary/update'
    });
};

export const saveOrUpdate = data =>{
    return data.id ? update(data) : save(data);
};

export const search = data => {
    return axios.request({
        method:'post',
        data:data,
        url:'dictionary/search'
    });
};